﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Vit.Report.XmlWebReport
{
    public static class ReportExtensions
    {
        public static CellElement NewElement(this Page page, string topLeftPosition, string bottomRightPosition, string content)
        {
            return new CellElement(page, topLeftPosition, bottomRightPosition, content);
        }

        public static Page AddElement(this Page page, string topLeftPosition, string bottomRightPosition, string content)
        {
            CellElement cell = new CellElement(page, topLeftPosition, bottomRightPosition, content);
            return page;
        }

        public static TableElement NewTableElement(this Page page, string topLeftPosition, string bottomRightPosition, string content)
        {
            return new TableElement(page, topLeftPosition, bottomRightPosition, content);
        }

        public static Page AddTableElement(this Page page, string topLeftPosition, string bottomRightPosition, string content)
        {
            TableElement tbl = new TableElement(page, topLeftPosition, bottomRightPosition, content);
            return page;
        }

        public static TableHeaderElement NewTableHeaderElement(this TableElement tbl, string topLeftPosition, string bottomRightPosition, string columnName, string content)
        {
            return new TableHeaderElement(tbl, topLeftPosition, bottomRightPosition, columnName, content);
        }

        public static TableElement AddTableHeaderElement(this TableElement tbl, string topLeftPosition, string bottomRightPosition, string columnName, string content)
        {
            TableHeaderElement header = new TableHeaderElement(tbl, topLeftPosition, bottomRightPosition, columnName, content);
            return tbl;
        }

        public static TableRowElement NewTableRowElement(this TableElement tbl, string topLeftPosition, string bottomRightPosition, string content)
        {
            return new TableRowElement(tbl, topLeftPosition, bottomRightPosition, content);
        }

        public static TableElement AddTableRowElement(this TableElement tbl, string topLeftPosition, string bottomRightPosition, string content)
        {
            TableRowElement row = new TableRowElement(tbl, topLeftPosition, bottomRightPosition, content);
            return tbl;
        }

        public static TableCellElement NewTableCellElement(this TableRowElement row, string topLeftPosition, string bottomRightPosition, string content)
        {
            return new TableCellElement(row, topLeftPosition, bottomRightPosition, content);
        }

        public static TableRowElement AddTableRowElement(this TableRowElement row, string topLeftPosition, string bottomRightPosition, string content)
        {
            TableCellElement cell = new TableCellElement(row, topLeftPosition, bottomRightPosition, content);
            return row;
        }
    }
}
